Skip to content

Conversation

@HzaCode
Copy link
Owner

@HzaCode HzaCode commented Dec 18, 2025

Summary

This PR addresses reviewer feedback on code quality and package hygiene.

Relates to: ropensci/software-review#728 (comment)

Changes

1. Reduced Cyclomatic Complexity

  • Extracted shared load calculation logic into internal helpers (R/internal_load.R)
  • calculate_acwr() and calculate_exposure() now use calculate_daily_load_internal()
  • Added validate_load_metric_params() for centralized validation
  • Public API unchanged - no breaking changes

2. Removed Unused Dependency

  • Removed viridis from Imports (was declared but never called)
  • Cleaned up DESCRIPTION, NAMESPACE, codemeta.json

3. Fixed R CMD check NOTEs

  • Added data-raw and generate_plot_examples.R to .Rbuildignore
  • Fixed Rd line width in plot_with_reference() examples

4. Version Bump

  • Updated to v1.0.1

…ndency

- Extract daily load calculation into internal helper (R/internal_load.R)
- Refactor calculate_acwr() to use calculate_daily_load_internal()
- Refactor calculate_exposure() to use the same helper
- Add validate_load_metric_params() for centralized validation
- Remove viridis from Imports (DESCRIPTION, NAMESPACE, codemeta.json)
- Remove @importFrom viridis from plot_exposure.R

Addresses reviewer comments on:
1. High cyclomatic complexity in core functions
2. Unused viridis package dependency

Public API unchanged - no documentation updates needed.
@HzaCode HzaCode merged commit d24ec04 into main Dec 18, 2025
4 of 5 checks passed
@HzaCode HzaCode deleted the refactor/reduce-complexity branch January 18, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants